import random
import string

# 字符串工具类

print('特殊字符：', string.punctuation)
print('数字：', string.digits)
print('字母：', string.ascii_letters)

total_character = string.punctuation + string.digits + string.ascii_letters
# 随机取10个字符
random_sample_1 = random.sample(total_character, 10)
random_sample_1_join = ''.join(random_sample_1)
print(f'随机字符：{random_sample_1_join}')
random_sample_2 = random.sample(total_character, 10)
random.shuffle(random_sample_2)
random_sample_2_join = ''.join(random_sample_2)
print(f'随机字符：{random_sample_2_join}')
